package manayShape_Polymorphism;

public class Person {
    String address;//Person父类和Teacher子类都有的成员变量address
    private String name;
    public int age;//Person父类的成员变量age(子类Teacher会继承此成员变量)


    void eat(){
        System.out.println(name+"正在吃饭...");
    }
    void sleep(){
        System.out.println(name+"正在睡觉...");
    }
    void sayHi(){
        System.out.println("大家好，我叫"+name+"，今年"+age+"岁了，家住"+address);
    }

    void walk(){
        System.out.println("先迈右脚走路");
    }
}

